<?php
/**
 * Created by zysc.
 * V 28002
 * Date: 2018\11\14 0014
 * Time: 17:04
 */
namespace z;
class out{
    public static function get($path,$data)
    {

        $url='http://221.231.109.86:8123/qrcode'.$path;
        Net::$isHeader=true;
        $content=Net::send($url,$data,'POST');
        $line="\r\n\r\n";
        $headPos=strpos($content,$line);
        $headStr=substr($content,0,$headPos);
        $bodytr=substr($content,$headPos+strlen($line));
        if(strpos($headStr,'application/json')!==false){
            $bodytr=json_decode($bodytr,true);
            return  $bodytr;
        }
        return [];
    }
}